package com.user.service

import com.data.annotation.OpenAnnotation
import com.data.util.Md5CodeUtils
import com.user.dao.UserAdminDao
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.stereotype.Service

@Controller
@OpenAnnotation
@Service
class UserAdminService {
    @Autowired
    private var userAdminDao: UserAdminDao? = null

    fun submitChangePasswordService(id: String, passwrod: String, oldPassword: String): Boolean =
            userAdminDao!!.submitChangePasswordDao(id, Md5CodeUtils.md5(passwrod), Md5CodeUtils.md5(oldPassword)) > 0


}